# !/usr/bin/env python
# -*- coding:utf-8 -*-
# @FileName : zsj.py
# @Time     : 2024/4/7 22:44
# @Author   : Robot-Zsj
"""
description:

input
alolobo
output
6
"""

s = input()


def getResult():
    c = s.count('o')

    if c % 2 == 0:
        return len(s)
    else:
        return len(s) - 1


print(getResult())
